package com.example.yunbiji0314.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.DateDeserializers;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 
 * @TableName article
 */
@Data
@Api(tags = "文章管理")
public class Article {
    @ApiModelProperty(value = "文章id")
    @ExcelIgnore
    private Integer id;
    @ApiModelProperty(value = "文章标题")
    @ExcelProperty(value = "文章标题")
    private String title;
    @ApiModelProperty(value = "文章内容")
    @ExcelProperty(value = "文章内容")
    private String content;
    @ApiModelProperty(value = "文章封面")
    @ExcelProperty(value = "文章封面")
    private String coverImg;
    @ApiModelProperty(value = "文章数量")
    private Integer count;
    @ApiModelProperty(value = "文章价格")
    private Integer price;
    @ApiModelProperty(value = "文章状态")
    @ExcelProperty(value = "文章状态")
    private String state;
    @ApiModelProperty(value = "文章分类Id")
    @ExcelProperty(value = "文章分类ID")
    private Integer categoryId;
    @ApiModelProperty(value = "创建人ID")
    @ExcelProperty(value = "创建人ID")
    private Integer createUser;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @ExcelIgnore
    private LocalDateTime createTime;
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @ExcelIgnore
    private LocalDateTime updateTime;
    @ApiModelProperty(value = "是否删除")
    @ExcelIgnore
    private Integer deleted;
    @ApiModelProperty(value = "文章分类")
    @ExcelIgnore
    private Category category;
}